<?php
class newsController extends Controller
{
    function showIndex()
    {
        $pagination_sql = "select * from news where type =10 and status <> 'D' order by createDate desc";
        $pagination_count_sql = "select count(1) as count from news where type =10 and status <> 'D' order by createDate desc ";
        $this->putIntoPage("pagination", $this->modules->News->pagination($pagination_sql, $pagination_count_sql));
        $this->render("news");
        // TODO: Implement showIndex() method.
    }

    function show()
    {
        $id = $this->_get['id'];
        $this->putIntoPage("news", $this->modules->News->load($id));
        $this->render("newdetail");
    }

    function fengxiangbiao()
    {
        $this->putIntoPage("aimeishi", $this->modules->News->findByTypeId(5, 1));
        $this->putIntoPage("ailvyou", $this->modules->News->findByTypeId(5, 2));
        $this->putIntoPage("aiwanle", $this->modules->News->findByTypeId(5, 3));
        $this->putIntoPage("shangpin", $this->modules->News->findByTypeId(5, 4));
        $this->render("fxb");
    }


}

?>